<div class="center">
	<div class="home">
    	<div class="home_left">
        	<?php echo $this->partial('member/menu.phtml',array('uCount' => $this->uCount,'menuId'=>$this->menuId,'user'=>$this->user,'account'=>$this->account)); ?>
        </div>
    	<div class="home_right">
            <script type="text/javascript">
                $(function(){
                   $('._status a').click(function(){
                       $('#status').val($(this).attr('href').substr(1));
                       $('form').submit();
                   });
                });
            </script>
			<div class="coupontop">
            	<i>我的优惠券</i>
                <div class="coupontopright">
                	<h1>我的优惠券</h1>
                    <ul>
                    	<li>可用优惠券：<span><?php echo $this->payStatus;?></span>张</li>
                        <li>将要过期的优惠券：<span><?php echo $this->timesStatus;?></span>张<strong>(有效期小于三个月)</strong></li>
                    </ul>
                </div>
            </div>
            <form method="post">
            <div class="couponnav _status">
            	<ul>
                    <li <?php if($this->status==1) echo 'class="couponnav_on"';?>><a href="?status=1">未使用优惠券</a></li>
                    <li <?php if($this->status==2) echo 'class="couponnav_on"';?>><a href="?status=2">已使用优惠券</a></li>
                    <li <?php if($this->status==-1) echo 'class="couponnav_on"';?>><a href="?status=-1">已过期优惠券</a></li>
                </ul>
            </div>
            <div class="Search_right">
                	<dl>
                            <dt>
                            <?php echo $this->formHidden('time')  ?>
                            <?= $this->formHidden('status') ?> </dt>
                        <dd></dd>
                    </dl>
                </div>
                </form>
            <div class="couponlist">
                <table>
                    <tr>
                        <th class="r1">名称</th>
                        <th class="r2">类别</th>
                        <th class="r3" style="width:50px;">面值</th>
                        <th class="r4" style="width:50px;">限额</th>
                        <th class="r5">有效期</th>
                        <th class="r6">使用说明</th>
                    </tr>
                    
                    <?
                    foreach ($this->coupon as $item) {?>
                    <tr>
                     <td class='r1'><?= $item->Name ?></td>
                                    <td class='r2'><?= $item->typeName ?></td>
                                    <td class='r3'>￥<?= $item->discount ?></td>
                                    <td class='r4'>￥<?= $item->type==0?"0":$item->Money; ?></td>
                                    <td class='r5'>开始时间:<?=date('Y-m-d',strtotime($item->startTime)).'<br />结束时间:'.date('Y-m-d',  strtotime($item->DateExpired))  ?></td>
                                    <td class='r6'>请在运单提交的页面上使用本优惠券</tDd>
                                </tr>
                       <? } ?> 
                 </table> 
                <div class="couponwu" <?php if($this->coupon!=null && count($this->coupon)>0) echo 'style="display:none;"';?> >
                	<p>您的帐户没有可使用优惠券！</p>
                </div> 
                
                 
                <div class="toolbar" <?php if(empty($this->coupon))  echo "style='display: none'"; ?>>
                    <?php echo $this->partial('paging.phtml',array("pages"=>$this->coupons,"state=>1")); ?>
                </div>
            </div>    

			<div class="couponask">
            	<h2>优惠券使用常见问题：</h2>
                <ul>
                	<li><a target="_blank" href="http://help.uuch.com/?p=106">1. 如何获取优惠券</a></li>
                    
                </ul>
            </div>

        </div>
    </div>
</div>